package com.time.sky.mapper;

import com.time.sky.entity.OBM;
import org.apache.ibatis.annotations.*;

import java.util.List;
@Mapper
public interface OBMMapper {
    @Select("SELECT * FROM OBM o LEFT JOIN BINFO b ON o.bid=b.bid ")
    List<OBM> selectList();
    @Insert("insert into OBM(oname,status,bid) " +
            "values(#{oname},#{status},#{bid})")
    void add(OBM obm);
    @Delete("delete from OBM where oid=#{oid}")
    void delete(int oid);
    @Select("SELECT * FROM OBM  where oid=#{oid}")
    OBM getById(int oid);
    @Update("update OBM set oname=#{oname},status=#{status},bid=#{bid} where oid=#{oid}")
    void update(OBM obm);
    @Select("select count(*) from OBM")
    int getRowCount();
}
